import { Component } from 'react'
import {View, Text } from '@tarojs/components'
import './index.scss'

export default class LgButton extends Component {
  state = {}

  componentDidMount () {}

  componentDidShow () {}

  componentDidHide () {}

  componentDidCatchError () {}

  render () {
    var props = this.props; 
    var className = props.className || "";
    if (props.type) className += "lg_btn_type" + props.type + " ";
    if (props.size) className += "lg_btn_size" + props.size + " ";
    if (props.color) className += "lg_btn_color" + props.color + " ";
    return (
        <View className={"lg_btn oneline " + className} 
              style={props.style || {}}
              onClick={() => { this.props.handle && this.props.handle(props.flag || "")}}>
            {props.children || ""}
        </View>
    )
  }
}